<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        const arr = ['小红', '你大红', '苏大强', '宝']
        
        // return无法停止forEach的循环 影响查找性能
        arr.forEach((item, index) => {
            console.log('ok')
            if(item === '苏大强') {
                return true
            }
        })

        arr.some((item, index) => {
            console.log('ok')
            if(item === '苏大强') {
                return true
            }
        })
    </script>

</body>
</html>